package com.itheima.day06;
/*
案例2:数组元素反转
 */

public class TestClassCase02 {

    public static void main(String[] args) {

        int[] arr={11,22,55,88,33};


        //也可以i<n为判断条件;
        for (int i=0,n=arr.length-1;i!=n;i++,n--){
            int temp=arr[i];
            arr[i]=arr[n];
            arr[n]=temp;
        }

        for (int a:arr) {
            System.out.println(a);
        }
    }
}
